<?php

Class db {
	private static $instance = NULL;

	private function __construct() {
		// TODO set some fields
	}

	public static function getInstance() {
		if (!self::$instance) {
			self::$instance = new PDO("mysql:host=$host;dbname=$db", $username, $password);
			self::$instane->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
		}
		return self::$instance;
	}

	private function __clone() {}
}

?>